const Promise = require('bluebird');
const models = require('../../src/models');
const mysqlConfig = require('../../config').mysql;
const settings = require('./data/settings.json');
const instance = models.newInstance(mysqlConfig);
const Settings = instance.Settings;

Promise.map(settings, function (setting) {
    return Settings.findOne({where: {name: setting.name}}).then(function (s) {
        if (!s) {
            return Settings.create(setting);
        }
    });
}, {concurrency: 1});

